package com.zilue.payment.gateway.method.order;

import com.zilue.payment.gateway.domain.CorpDO;
import com.zilue.payment.gateway.manage.OrderQueryManager;
import com.zilue.payment.gateway.method.BaseMethod;
import com.zilue.payment.gateway.paramter.BaseParameter;
import com.zilue.payment.gateway.paramter.order.QueryParameter;
import com.zilue.payment.gateway.reurndata.PublicReturn;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by zilue on 2017/3/7.
 */
@Service("hfpay.trade.order.query")
public class Query implements BaseMethod {
    @Autowired
    private OrderQueryManager orderQueryManager;

    @Override
    public PublicReturn doMethod(CorpDO corpDO, BaseParameter baseParameter) {
        QueryParameter queryParameter = (QueryParameter) baseParameter;
        return orderQueryManager.query(corpDO, queryParameter);

    }

    @Override
    public Class<? extends BaseParameter> paramterClass() {
        return QueryParameter.class;
    }
}
